package com.biz.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.core.entity.Attendance;
import com.core.entity.Lesson;
import com.core.entity.Location;
import com.core.entity.UserEntity;

public class AttendanceService {
	public AttendanceService(){
		
	}
	public List<Lesson> getTestLesson(Location location){
		List<Lesson> lessons = new ArrayList<Lesson>();
		Lesson lesson = new Lesson("音乐","贝多芬","c201",new Location("2015-5-4",22.37682,113.572268,"珠海市香洲区哈工大路1号"));
		lessons.add(lesson);
		Lesson lesson2 = new Lesson("体育","麦迪","1号操场",new Location("2015-5-4",22.37682,113.572268,"珠海市香洲区哈工大路2号"));
		lessons.add(lesson2);
		return lessons;
	}
	
	public List<String> getFitMapForAdapter(Location location){
		List<String> list = new ArrayList<String>();
		for (Lesson lesson :getTestLesson(location)){
			list.add(lesson.toString());
		}
		return list;
	}
	
	public boolean signByStudent(Location location){
		//....http
		return true;
	}
	
	public List<Attendance> getTestAttendance(Lesson curLesson){
		List<Attendance> attendances = new ArrayList<Attendance>();
		Lesson lesson = new Lesson("音乐","贝多芬","c201",new Location("2015-5-4",22.37682,113.572268,"珠海市香洲区哈工大路1号"));
		Attendance attendance = new Attendance(lesson,new UserService().getUserDemo(""),new Location(),"signed");
		return attendances;
	}
	
	public List<String> getTestSpinDropDown(UserEntity entity){
		List<String> list = new ArrayList<String>();
		for (Lesson lesson :getTestLesson(null)){
			list.add(lesson.getLessonName());
		}
		return list;
	}
	
	
}
